<template>
  <Content>
    <page-search :form-config="deepSearchForm">
      <template #searchBtn>
        <search-btn
          ref="searchBtnRef"
          @handleSearch="handleSearch"
          @handleRest="handleRest"
        />
      </template>
    </page-search>
  </Content>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import Content from 'components/common/Content.vue'
import PageSearch from 'components/page-search'
import SearchBtn from 'components/common/SearchBtn.vue'
import { useStore } from '@/store'
import { singleTicketForm } from './config/config'
import _ from 'lodash'

export default defineComponent({
  name: 'SingleTicket',
  components: {
    Content,
    PageSearch,
    SearchBtn
  },
  setup() {
    const store = useStore()
    const deepSearchForm = _.cloneDeep(singleTicketForm)
    deepSearchForm[3].optionValue = store.getters['login/agentCodes']

    const handleSearch = () => {}
    const handleRest = () => {}
    return {
      deepSearchForm,
      handleSearch,
      handleRest
    }
  }
})
</script>

<style scoped></style>
